Among charged particle beam apparatuses, there are electron microscopes as microscopes with which a sample can be magnified and observed. Electron microscopes use an electron beam and are utilized in micro-shape observation and composition analysis at the nanometer level. Especially, scanning electron microscopes (hereafter, abbreviated as SEMs) are characterized in that SEMs enables analysis dimensions of the order from millimeters to nanometers without being limited by sample sizes and in wide use from morphological and compositional analysis of high-performance materials to measurements and inspections on fine patterns of semiconductor devices. In these morphological and compositional analysis and fine pattern measurements and inspections, generally, it is required to analyze not only information of the surfaces of samples but also information in the cross-sectional direction (depth direction) such as the materials and structures of the interior of samples. To acquire information in the cross-sectional direction, generally, a sample is cut open and the resulting section is observed; however, this is destructive observation. In some SEM methods of analyzing the interior of a sample in a nondestructive manner, the acceleration voltage of an electron beam applied to an electron source is controlled. In SEMs, the energy of an electron beam applied to a sample is adjusted by controlling acceleration voltage. The depth to which an electron beam penetrates a sample depends on the energy of the electron beam and reflection electrons are emitted from an internal structure located in the depth position to which the electron beam penetrates. A SEM image mainly embracing information of the interior of the sample is obtained by detecting the reflection electrons. Japanese Unexamined Patent Application Publication No. 2012-252913 discloses a method in which the amount of irradiation of electrons is controlled by a pulsed electron beam and embedded structures are observed by voltage contrast arising from surface electrification. The voltage contrast reflects a difference in surface potential produced by electrification by electron beam irradiation. The difference in surface potential is caused by a difference in electrical characteristics (resistance and capacitance) from sample to sample. Since the electrical characteristics of samples differ depending on the presence or absence of an internal structure of each sample, the internal structure can be visualized by voltage contrast with controlled electrification.